package com.asion.qkan.ui.presenter;

import com.asion.qkan.entry.MaterialBean;
import com.asion.qkan.ui.contract.MaterialContract;

/**
 * Created by HCJ on 2016/10/17.
 */

public class MaterialPresenter extends MaterialContract.Presenter{

    @Override
    public void onStart() {
        super.onStart();
    }

    @Override
    public void setAllContentDatas(String id) {
        mModel.getMaterialDatas(id, new MaterialContract.OnMaterialListener() {
            @Override
            public void onMaterialSuccess(MaterialBean materialBean) {
                mView.showDataSuccess(materialBean);
            }

            @Override
            public void onMaterialError(Throwable throwable) {
                mView.showDataError(throwable);
            }
        });
    }
}
